<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/work_today.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script>
$(function(){
	$("#nickname").val("${nickName}");
});

var selectMsg = function(){
	var nickName = $("#nickname").val();
	window.location.href=encodeURI("${contextPath}/index/system_userlist.htm?nickName="+nickName+"&type=${type}");
}

function starquery(type)
{
	if(type==0)
	{
		var name = $("#nickname").val();
		var param = "";
		if(name!="") param += "&n=" + name;
	
		location.href = "?" + param;
	}
	else
	{
		location.href = "?";
	}
}
</script>
</head>

<body>
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>帐号管理</li>
			<li>&gt;</li>
			<li class="current"></li>
		</ul>
	</div>
	<div id="container">
		<div id="title"></div>
		<table class="form_table">
			<tr>
				<td><label><b>查询条件：</b></label> 
				<label for="nickname">姓名：</label> 
					<input type="text" name="nickname" id="nickname" size="15" value="" /> 
					<input type="button" value=" 查 询 " onclick="selectMsg()" />
				</td>
			</tr>
		</table>
		<table>
			<tr class="fields">
				<th>帐号</th>
				<th>姓名</th>
				<th>办公地址</th>
				<th>职位</th>
				<th>创建日期</th>
				<#if webutil.getCookieUser().username=="system" || webutil.getCookieUser().username=="yexiling"|| webutil.getCookieUser().username=="liuchenxue"|| webutil.getCookieUser().username=="yuanjing"><th width="20%">操作</th></#if>
			</tr>
			
			<#if office_List??>
				<#list list as list>
				<tr class="even_row">
					<td align="center" class="stress">${list.username}</td>
					<td align="center">${list.nickname}</td>
					<td align="center">${list.regions}</td>
					<td align="center">${list.departments}（${list.job}）</td>
					<td align="center">${list.createTime}</td>
				<#if webutil.getCookieUser().username=="system" || webutil.getCookieUser().username=="yexiling" || webutil.getCookieUser().username=="yuanjing"|| webutil.getCookieUser().username=="liuchenxue">
					<td align="center">
						<a href="${contextPath}/index/system_user_base_modify.htm?username=${list.username}">修改基本信息</a> - 
						<a href="${contextPath}/index/system_userinfo.htm?username=${list.username}">详细信息</a>
					</td>
				</#if>
				</tr>
				</#list>
			</#if>
			
			<#if tlist??>
				<#list tlist as list>
				<tr class="even_row">
					<td align="center" class="stress">${list.username}</td>
					<td align="center">${list.nickname}</td>
					<td align="center">${list.regions}</td>
					<td align="center">训练老师（来源训练系统）</td>
					<td align="center">${list.parent}</td>
				</tr>
				</#list>
			</#if>
		</table>
	</div>
	
	<#if webutil.getCookieUser().username=="system" || webutil.getCookieUser().username=="wangjianv" || webutil.getCookieUser().username=="yuanjing"> 
	<div id="pager" style="width: 849px;">
		<ul id="pagination">
			<#if page??>
		<#if page.pagetotal?? && page.pagetotal!="0">
	<#assign pagetotal = page.pagetotal>
	<#else>
	<#assign pagetotal = 1>
	</#if>
			<#if page.currpage??>
	<#assign currpage = page.currpage>
	<#else>
	<#assign currpage = 1>
	</#if>
				<#if currpage==1 >
					<li class="previous-off">上一页</li>
					<#else>
					<li class="previous"><a href="${contextPath}/index/system_userlist.htm?currPage=${currpage-1}&nickName=${nickName}">上一页</a></li>
					</#if>
					
		<#if pagetotal<=11>
			<#list 1..pagetotal as index_up>  
	           <#if currpage==index_up > 
	           		<li class="current">${index_up}</li>
	           <#else>
	           		<li><a href="${contextPath}/index/system_userlist.htm?currPage=${index_up}&nickName=${nickName}">${index_up}</a></li>  
	           </#if>  
			</#list>  
		<#else>
			<#if currpage<=8 >
				<#list 1..9 as index_up>  
	           	<#if currpage==index_up >  
	            	<li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/system_userlist.htm?currPage=${index_up}&nickName=${nickName}">${index_up}</a></li> 
	           	</#if>
	           	</#list>  
	           	<li>...</li>
	           	<li><a href="${contextPath}/index/system_userlist.htm?currPage=${pagetotal}&nickName=${nickName}">${pagetotal}</a></li>  
				
			<#elseif (currpage>= 9 && currpage<pagetotal-7)  >	
				<li><a href="${contextPath}/index/system_userlist.htm?currPage=1&nickName=${nickName}">1</a></li>  
				<li>...</li>
				<#list currpage-3..currpage+3 as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/system_userlist.htm?currPage=${index_up}&nickName=${nickName}">${index_up}</a></li>  
	           	</#if>
	           	</#list>
				<li>...</li>
	           	<li><a href="${contextPath}/index/system_userlist.htm?currPage=${pagetotal}&nickName=${nickName}">${pagetotal}</a></li>   
			<#else>
				<li><a href="${contextPath}/index/system_userlist.htm?currPage=1&nickName=${nickName}">1</a></li> 
				<li>...</li>
				<#list pagetotal-8..pagetotal as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/system_userlist.htm?currPage=${index_up}&nickName=${nickName}">${index_up}</a></li> 
	           	</#if>
				</#list>  
			</#if>
			
		</#if> 
		<#if currpage==pagetotal >
		 	<li class="previous-off">下一页</li>
		<#else>
			<li class="previous"><a href="${contextPath}/index/system_userlist.htm?currPage=${currpage+1}&nickName=${nickName}">下一页</a></li>
		</#if>
		<li class="pageinfo">共${page.total}条记录</li>
	</#if>
		</ul>
	</div>
	</#if>
	
	<div class="emptyline"></div>
</body>
</html>